#include<iostream> 
#include<stdio.h>
#include<string.h> 
#include<cstdlib>
#include<cmath>
#include<algorithm>
using namespace std;

int main()
{
  string s;
  while(getline(cin,s)){
    if( s[0]>='a'&&s[0]<='z' )  s[0]=s[0]-32;
    for(int i=1;i<s.length();i++)
        if(  (s[i-1]==' '||s[i-1]=='\t'||s[i-1]=='\t'||s[i-1]=='\n') && (s[i]>='a'&&s[i]<='z') )   s[i]=s[i]-32;
    cout<<s<<endl;
  } 
      
  return 0;
}
